export const menu_status = {
  '': '全部',
  1: '正常',
  2: '已停用'
  // 3: '已冻结'
}
export const companyTypeStr = {
  AG: '经营企业',
  FC: '生产企业',
  HO: '医疗机构',
  MM: '运营平台',
  SV: '服务商',
  AM: '三方服务/审计公司服务'
}
export const userManagement = [
  // 表头定义
  // { 此处不需要多选
  //   type: 'selection'
  // },
  {width: '60px', type: 'index', label: '序号', align: 'center'},
  {minWidth: '130px', prop: 'name', label: '用户组名称', align: 'center'},
  {
    minWidth: '150px',
    prop: 'companyTypeStr',
    label: '企业类型',
    align: 'center',
    'show-overflow-tooltip': true
  },
  {
    minWidth: '120px',
    prop: 'status',
    label: '状态',
    align: 'center',
    formatter: row => {
      return menu_status[row.status]
    }
  },
  {
    minWidth: '120px',
    prop: 'defaultConfigStr',
    label: '默认配置',
    align: 'center'
  },
  {minWidth: '150px', prop: 'createdBy', label: '创建人', align: 'center'},
  {minWidth: '180px', prop: 'createdAt', label: '创建时间', align: 'center'},
  {
    minWidth: '230px',
    prop: 'btnGroup',
    label: '操作',
    fixed: 'right',
    align: 'center'
  }
]

export const approveStatus = [{lab: '停用', val: 0}, {lab: '启用', val: 1}]
export const defaultConfigData = [{lab: '是', val: '1'}, {lab: '否', val: '0'}]
export const companyTypeData = [
  {lab: '经营企业', val: 'AG'},
  {lab: '生产企业', val: 'FC'},
  {lab: '医疗机构', val: 'HO'},
  {lab: '运营平台', val: 'MM'},
  {lab: '服务商', val: 'SV'},
  {lab: '三方服务/审计公司服务', val: 'AM'}
]
// 一个用户对应多个组织菜单
export const dialogColumns = [
  {width: '60px', type: 'index', label: '序号'},
  {minWidth: '150px', prop: 'orgPositionName', label: '组织-岗位'},
  {minWidth: '120px', prop: 'roleName', label: '角色名称'},
  {width: '110px', prop: 'btnGroup', label: '操作'}
]
// 用户组管理form
export const searchContent = [
  {
    key: 'name',
    title: '用户组名称',
    type: 'input',
    attr: {
      clearable: true,
      placeholder: '请输入'
    }
  },
  {
    key: 'companyType',
    title: '企业类型',
    type: 'select',
    attr: {
      clearable: true,
      placeholder: '请选择'
    },
    options: Object.keys(companyTypeStr).map(item => {
      return {
        label: companyTypeStr[item],
        value: item
      }
    })
  },
  {
    key: 'status',
    title: '状态',
    type: 'select',
    attr: {
      clearable: true,
      placeholder: '请选择'
    },
    options: Object.keys(menu_status).map(item => {
      return {
        label: menu_status[item],
        value: item
      }
    })
  }
]
// 用户组管理form
export const searchGroupCompanyForm = [
  {
    key: 'companyName',
    title: '企业名称',
    type: 'input',
    attr: {
      placeholder: '企业名称'
    }
  },
  {
    key: 'companyType',
    title: '企业类型',
    type: 'select',
    attr: {
      placeholder: '请选择'
    },
    options: Object.keys(companyTypeStr).map(item => {
      return {
        label: companyTypeStr[item],
        value: item
      }
    })
  },
  {
    key: 'status',
    title: '状态',
    type: 'select',
    attr: {
      placeholder: '请选择'
    },
    options: []
  },
  {
    key: 'createAt',
    title: '创建时间',
    type: 'time',
    fieldname: ['startTimeVarName', 'endTimeVarName'],
    attr: {
      class: 'daterange',
      type: 'daterange',
      'start-placeholder': '开始月份',
      'end-placeholder': '结束月份',
      'default-time': ['00:00:00', '23:59:59']
    }
  }
]
// 用户组管理/设置/企业用户
export const GroupCompanyManagement = [
  {width: '60px', type: 'index', label: '序号'},
  {minWidth: '130px', prop: 'companyName', label: '企业名称'},
  {
    minWidth: '150px',
    prop: 'companyType',
    label: '企业类型',
    'show-overflow-tooltip': true,
    formatter: row => {
      return companyTypeStr[row.companyType]
    }
  },
  {
    minWidth: '150px',
    prop: 'unifiedSocialCreditCode',
    label: '统一社会信用代码'
  },
  {minWidth: '130px', prop: 'userName', label: '用户名'},
  {minWidth: '130px', prop: 'mail', label: '邮箱'},
  {minWidth: '130px', prop: 'phone', label: '手机号'},
  {minWidth: '230px', prop: 'btnGroup', label: '操作', fixed: 'right'}
]
